/*---------------------------------------------
	/ Main Styles
*/
.content {
	display: flex;
	flex-flow: column;
}

header {
	z-index: 1;
	width: 100%;
	flex: 0 0 auto;
	padding: 0 25px;
	font-size: 16px;
	line-height: 55px;
	position: relative;
	letter-spacing: .4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .12),
				0 1px 2px rgba(0, 0, 0, .24);
}

a {
	color: inherit;
	text-decoration: none;
}

span.nested-link[data-href] {
	color: #333;
	font-weight: 500;
}

.dark span.nested-link[data-href] {
	color: #CCC;
}








/*---------------------------------------------
	/ Tabs
*/
.tabs {
	padding: 0;
	display: block;
	margin: 0 -25px;
	overflow: hidden;
	line-height: 32px;
	white-space: nowrap;
}

header .title ~ .tabs {
	margin-top: -10px;
}

.tabs li {
	color: #888;
	min-width: 50px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	padding: 2px 16px;
	letter-spacing: 0;
	text-align: center;
	display: inline-block;
	transition: all .2s ease;
	text-transform: uppercase;
}

.dark .tabs li {
	color: #AAA;
}

.dark.transparent .tabs li:not(:hover):not(:active):not(.active) {
	color: #CCC;
}

.tabs li:hover {
	color: inherit;
}

.tabs li:active {
	background: rgba(0, 0, 0, .05);
}

.tabs li.active {
	color: #2196F3;
	padding-bottom: 0;
	border-bottom: 2px solid;
}

.tabs button {
	margin: 0;
	bottom: 0;
	padding: 0;
	width: 32px;
	color: #333;
	min-width: 0;
	display: none;
	font-size: 18px;
	background: none;
	line-height: 36px;
	position: absolute;
	font-family: Entypo;
	transition: opacity .15s ease;
}

.tabs button,
.tabs button:hover,
.tabs button:active {
	background: none;
}

.dark .tabs button,
.dark .tabs button:hover,
.dark .tabs button:active {
	color: #CCC;
}

.tabs .scroll-right {
	right: 0;
}

.tabs .scroll-left {
	left: 0;
}

.tabs.scrollable-right {
	margin-right: 7px;
}

.tabs.scrollable-right button.scroll-right {
	display: inline-block;
}

.tabs.scrollable-left {
	margin-left: 7px;
}

.tabs.scrollable-left button.scroll-left {
	display: inline-block;
}






/*---------------------------------------------
	/ Loading screen
*/
.loading {
	flex: 1 1 350px;
	position: relative;
	background: rgba(0, 0, 0, .1);
}

.loading svg {
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	margin: auto;
	position: absolute;
}

.spinner {
	-webkit-animation: rotator 1.4s linear infinite;
}

.spinner circle {
	stroke-dashoffset: 0;
	stroke-dasharray: 187;
	transform-origin: center;
	animation: dash 1.4s ease-in-out infinite, colors 5.6s ease-in-out infinite;
}

@-webkit-keyframes rotator {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(270deg);
	}
}

@-webkit-keyframes colors {
	0%		{ stroke: #4285F4; }
	25%		{ stroke: #DE3E35; }
	50%		{ stroke: #F7C223; }
	75%		{ stroke: #1B9A59; }
	100%	{ stroke: #4285F4; }
}

@-webkit-keyframes dash {
	0% {
		stroke-dashoffset: 187;
	}
	50% {
		stroke-dashoffset: 46.75;
		transform: rotate(135deg);
	}
	100% {
		stroke-dashoffset: 187;
		transform: rotate(450deg);
	}
}








/*---------------------------------------------
	/ Items
*/
.items {
	flex: 1 1 100%;
	overflow: auto;
}

.item {
	font-size: 0;
	display: block;
	transition: background .1s ease;
}

.item:hover {
	background: #FAFAFA;
}

.dark .item:hover {
	background: #2C2C2C;
}

.dark.transparent .item:hover {
	background: rgba(0, 0, 0, .15);
}

.item .image {
	width: 100px;
	height: 95px;
	display: inline-block;
	background: #EAEAEA center/cover no-repeat;
}

.dark .item .image {
	background-color: #2A2A2A;
}

.item:not(:last-child),
.item:not(:last-child) .image {
	box-shadow: inset 0 -2px 0 -1px rgba(200, 200, 200, .5);
}

.dark .item:not(:last-child),
.dark .item:not(:last-child) .image {
	box-shadow: inset 0 -2px 0 -1px rgba(0, 0, 0, .15);
}

.item .desc,
.item .content {
	color: #757575;
	font-size: 12px;
	overflow: hidden;
	max-height: 76px;
	line-height: 18px;
	vertical-align: top;
	margin: 8px 10px 10px;
	display: inline-block;
}

.dark .item .desc,
.dark .item .content {
	color: #AAA;
}

.dark.transparent .item .desc,
.dark.transparent .item .content {
	color: #DDD;
}

.item .image ~ .content {
	width: calc(100% - 120px);
}

.item .title {
	color: #333;
	font-size: 13px;
	overflow: hidden;
	font-weight: 500;
	max-height: 36px;
	line-height: inherit;
	font-family: inherit;
	transition: color .1s ease;
}

.dark .item .title {
	color: #EEE;
}

.item .content.desc .title {
	margin-bottom: 3px;
}





/*---------------------------------------------
	/ Images view
*/
.images .item {
	max-height: 100%;
}

.images img {
	width: 100%;
	height: auto;
}







/*---------------------------------------------
	/ Maximized
*/
.maximized > .content {
	height: 100%;
	display: flex;
	flex-flow: column;
}

.maximized .loading {
	height: 100%;
}

.maximized header {
	background: #FFF;
}

.dark :root.maximized header {
	background: #333;
}

.maximized header button.layout {
	float: right;
	margin: 10px 36px 10px 0;
}

.maximized header button[data-state="list"] svg.list,
.maximized header button[data-state="cards"] svg.cards {
	display: none;
}







/*---------------------------------------------
	/ Maximized / Card Layout
*/
.maximized .items.cards {
	padding: 5px;
	display: flex;
	background: #EEE;
	flex-flow: row wrap;
}

.dark :root.maximized .items.cards {
	background: #2A2A2A;
}

.maximized .items.cards .item {
	flex: 1 18%;
	margin: 5px;
	display: flex;
	background: #FFF;
	overflow: hidden;
	max-height: 345px;
	border-radius: 2px;
	flex-direction: column;
	transform: translateZ(0); /* The shadows can get a little intensive and make scrolling jerky */
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06),
				0 1px 1px rgba(0, 0, 0, .12)!important;
}

.dark :root.maximized .items.cards .item {
	background: #3A3A3A;
}

.maximized .items.cards .item .image {
	flex: 0 0;
	width: 100%;
	min-width: 0; /* crbug.com/546034 fix - flex issues in Chrome 48+ */
	height: 175px;
}

.maximized .items.cards .item .title {
	flex: 0 0;
	min-width: 0; /* crbug.com/546034 fix - flex issues in Chrome 48+ */
	margin: 10px 10px 0;
}

.maximized .items.cards .item .desc {
	flex: 1 1;
	min-width: 0; /* crbug.com/546034 fix - flex issues in Chrome 48+ */
	margin: 3px 10px 0;
	max-height: initial;
	width: initial!important;
}

.maximized .items.cards .item .details {
	flex: 0 0;
	margin: 0;
	height: 28px;
	min-width: 0; /* crbug.com/546034 fix - flex issues in Chrome 48+ */
	color: #757575;
	display: block;
	padding: 0 10px;
	font-size: 11px;
	overflow: hidden;
	line-height: 28px;
	white-space: nowrap;
	font-family: Open Sans, sans-serif;
}

.dark :root.maximized .items.cards .item .details {
	color: #BBB;
}

.maximized .items.cards .item .details .date {
	float: right;
}

.maximized .items.cards .item .details .author {
	max-width: 50%;
	overflow: hidden;
	white-space: nowrap;
	display: inline-block;
	vertical-align: bottom;
	text-overflow: ellipsis;
}








/*---------------------------------------------
	/ Maximized / Card Layout / Featured Items
*/
.maximized .items.cards .item.featured {
	flex: 3 60%;
	min-height: 400px;
	max-height: 400px;
	background: center/cover no-repeat #EAEAEA;
}

.maximized .items.cards .item.featured:nth-child(2) {
	flex: 1 30%;
}

/* This pushes the rest of the contents to the bottom */
.maximized .items.cards .item.featured:before {
	flex: 1 0 0;
	content: "";
	min-width: 0; /* crbug.com/546034 fix - flex issues in Chrome 48+ */
}

.maximized .items.cards .item.featured span.nested-link[data-href] {
	color: #FFF;
}

.maximized .items.cards .item.featured .title {
	color: #FFF;
	font-size: 20px;
	font-weight: 400;
	line-height: 24px;
	max-height: initial;
	margin: 10px 10px 5px;
	letter-spacing: -.4px;
}

.maximized .items.cards .item.featured .desc {
	flex: 0 1;
	margin: 0;
	color: #FFF;
	bottom: 25px;
	min-width: 0; /* crbug.com/546034 fix - flex issues in Chrome 48+ */
	padding: 0 10px;
	max-height: 36px;
	transition: max-height .2s ease;
	width: calc(100% - 20px)!important;
}

.maximized .items.cards .item.featured:hover .desc {
	max-height: 72px;
}

.maximized .items.cards .item.featured .details {
	color: #EEE;
}

.maximized .items.cards .item.featured .details .date {
	padding-left: 5px;
}








/*---------------------------------------------
	/ Maximized / List View
*/
.items.list {
	padding: 15px;
}

.items.list .item {
	font-size: 12px;
	padding: 5px 10px;
	white-space: nowrap;
}

.items.list .item:first-child {
	border-top: 1px solid rgba(200, 200, 200, .5);
}

.items.list .item > span {
	overflow: hidden;
	display: inline-block;
	vertical-align: bottom;
	text-overflow: ellipsis;
}

.items.list .item .source {
	width: 8%;
	font-weight: 700;
}

.items.list .item .desc {
	margin: 0;
	max-width: calc(100% - 130px);
}

.items.list .item .source ~ .desc {
	max-width: calc(92% - 130px);
}

.items.list .desc b.title {
	margin-right: 5px;
}

.items.list .item .date {
	width: 115px;
	float: right;
	text-align: right;
}







/*---------------------------------------------
	/ Settings
*/
.settings header button.save {
	float: right;
	min-width: 60px;
	margin: 12px -12px 12px 0;
}

.settings form {
	min-height: 0;
	flex: 1 1 100%;
	overflow: auto;
	background: #FCFCFC;
}

.dark :root.settings form {
	background: rgba(0, 0, 0, .15);
}